-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(networkfirewall): add new check networkfirewall_logging_enabled
#5145
feat(networkfirewall): add new check networkfirewall_logging_enabled
#5145
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5145 +/- ##
==========================================
- Coverage 89.12% 89.09% -0.03%
==========================================
Files 993 998 +5
Lines 30509 30693 +184
==========================================
+ Hits 27190 27346 +156
- Misses 3319 3347 +28 ☔ View full report in Codecov by Sentry. |
…://github.com/prowler-cloud/prowler into PRWLR-4556-ensure-logging-is-enabled-for-aws-network-firewall
…ws-network-firewall
|
||
print(firewall.logging_configuration) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print(firewall.logging_configuration) |
"Network Firewall - Describe Network Firewalls Logging Configuration..." | ||
) | ||
try: | ||
for network_firewall in self.network_firewalls: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the dict logic please.
if ( | ||
configuration.log_type in LogType | ||
and configuration.log_destination != {} | ||
): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic should be:
The control fails if logging isn't enabled for at least one log type or if the logging destination doesn't exist.
"CheckType": [ | ||
"Software and Configuration Checks/Industry and Regulatory Standards/NIST 800-53" | ||
], | ||
"ServiceName": "Network Firewall", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"ServiceName": "Network Firewall", | |
"ServiceName": "networkfirewall", |
"Software and Configuration Checks/Industry and Regulatory Standards/NIST 800-53" | ||
], | ||
"ServiceName": "Network Firewall", | ||
"SubServiceName": "Logging", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"SubServiceName": "Logging", | |
"SubServiceName": "", |
"SubServiceName": "Logging", | ||
"ResourceIdTemplate": "arn:partition:network-firewall::account-id:firewall/firewall-name", | ||
"Severity": "medium", | ||
"ResourceType": "AwsNetworkFirewallLoggingConfiguration", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"ResourceType": "AwsNetworkFirewallLoggingConfiguration", | |
"ResourceType": "AwsNetworkFirewallFirewall", |
…ws-network-firewall
…rewall' of https://github.com/prowler-cloud/prowler into PRWLR-4556-ensure-logging-is-enabled-for-aws-network-firewall
Context
The security of our network is vital to protect sensitive data and infrastructure. Without logging enabled on AWS Network Firewall, we lose visibility into network traffic and firewall actions, which can lead to vulnerabilities and compliance issues.
Description
This check fails when logging is not enabled in 1 or more
Network Firewall
firewalls and returns a list of them.Checklist
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.